<!-- catalog/templates/catalog/author_detail.html -->
{% extends "base_generic.html" %}

{% block content %}
  <div class="card">
    <h1>作者：{{ author.last_name }}{{ author.first_name }}</h1>
    <p>{{ author.date_of_birth }} - {% if author.date_of_death %}{{ author.date_of_death }}{% endif %}</p>
    <div style="margin-left:20px;margin-top:20px">
      <h4>著作列表</h4>
      {% for book in author.book_set.all %}
        <hr>
        <p><a href="{{ book.get_absolute_url }}" class="btn btn-main">{{ book.title }}</a></p>
        <p>{{ book.summary }}</p>
      {% endfor %}
    </div>
  </div>
{% endblock %}